package ru.linnenson.darshana.infrastructure.rest;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ru.linnenson.darshana.infrastructure.rest.dto.LoginResponse;

@Slf4j
@RestController
@RequestMapping()
@RequiredArgsConstructor
public class AuthController {

  @PostMapping("/login")
  public ResponseEntity<LoginResponse> login() {

    log.info("Request to login");

    LoginResponse response = new LoginResponse(1, "admin");

    return ResponseEntity.ok(response);
  }

  @PostMapping("/logout")
  public ResponseEntity<Void> logout() {

    log.info("Request to login");

    return ResponseEntity.ok().build();
  }
}
